Solving #23 Issue in the checkbox component, it is not showing the code correctly and showing a error message#24
Solving #23 Issue in the checkbox component, it is not showing the code correctly and showing a error message#24The-x-35 wants to merge 2 commits intohoppscotch:mainfrom
Conversation
…ch was causing the error
jamesgeorge007
left a comment
There was a problem hiding this comment.
So, from the stack trace it can be observed that the error gets logged when Histoire processes the props where it treats the entries starting with on as events attaching the @ prefix and fails to extract the event name since there aren't any characters appearing after on in this case being a prop, ref.
We'd ideally want to rename the on prop and can use this opportunity to follow a two-way data binding approach (modelValue prop) leveraging the useVModel composable. We can keep the existing event name change set via options instead of the default update:modelValue convention.
You can refer to the existing components, that follow this convention. For instance, HoppSmartInput.
ui/src/components/smart/Input.vue
Line 78 in e3bab05
Since this PR is likely to introduce a breaking change, it'll be made to target the next branch once it is up.
There was a problem hiding this comment.
Please remove these changes.
|
The ui/src/components/smart/Toggle.vue Lines 18 to 23 in e3bab05 |
|
okay i will try and see what all i can do |
Solving #23 Made the checkbox on by default in the checkbox component and remove the ref which was causing the error. I have tested the code and it works.
